﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Sbook.Data;

namespace Sbook.Business
{
    public class NewsService
    {
        private static NewsController db = new NewsController();
        #region[News_GetByAll]
        public static List<Data.NewsInfo> News_GetByAll()
        {
            return db.News_GetByAll();
        }
        #endregion

        #region[News_GetById]
        public static List<Data.NewsInfo> News_GetById(string Id)
        {
            return db.News_GetById(Id);
        }
        #endregion
        #region[News_GetByTop]
        public static List<NewsInfo> News_GetByTop(string top, string where, string order)
        {
            return db.News_GetByTop(top, where, order);
        }
        #endregion
        
        #region[News_Insert]
        public static bool News_Insert(NewsInfo news)
        {
            return db.News_Insert(news);
        }
        #endregion
        #region[News_Update]
        public static bool News_Update(NewsInfo news)
        {
            return db.News_Update(news);
        }
        #endregion
        public static bool News_UpdateStatus(string Id, string status)
        {
            return db.News_UpdateStatus(Id,status);
        }

        public static bool News_Delete(string Id)
        {
            return db.News_Delete(Id);
        }

        public static int News_GetCount()
        {
            return db.News_GetCount();
        }

        public static List<Data.NewsInfo> News_Paging(string currentPage,string pageSize)
        {
            return db.News_Paging(currentPage,pageSize);
        }
    }
}